<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>updatepass</title>
    <!-- Bootstrap core CSS-->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom fonts for this template-->
    <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!-- Custom styles for this template-->
    <link href="css/sb-admin.css" rel="stylesheet">
    <script>
        function alter() {
            var name = $("#lId").val();
            var pass = $("#lPass").val();
            var sure = $("#lPass1").val();

            if (name == "") {
                alert("用户名不能为空");
                return false;
            }
            if (pass == "") {
                alert("原密码不能为空");
                return false;
            }
            if (sure == "") {
                alert("新密码不能为空");
                return false;
            }
            if (pass == sure) {
                alert("新密码与原密码不能相同");
                return false;
            } else {
                $("#form").submit();
            }
        }
    </script>
</head>

<body class="bg-dark">
<div class="container">
    <div class="card card-login mx-auto mt-5">
        <div class="card-header">修改密码</div>
        <div class="card-body">
            <form action="resetpass.action" method="post" id="form">
                <div class="form-group">
                    <label for="lId">用户名</label>
                    <input class="form-control" id="lId" name="lId" type="text" placeholder="请输入用户名">

                </div>
                <div class="form-group">
                    <label for="lPass">原密码</label>
                    <input class="form-control" id="lPass" name="lPass" type="password" placeholder="请输入密码">
                </div>
                <div class="form-group">

                    <label for="lPass1">新密码</label>
                    <input class="form-control" id="lPass1" name="lPass1" type="password" placeholder="确认密码"
                           onkeyup="validate()">
                </div>
                <input class="btn btn-primary btn-block" type="submit" value="确定" onclick="alter()">
            </form>
            <div class="text-center">
                <a class="d-block small mt-3" href="tologin1.action">返回登录页面</a>
            </div>
        </div>
    </div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="js/jquery.easing.min.js"></script>
</body>

</html>
